<!DOCTYPE html>
<?php
require 'execute/auth.php';
require 'config/config.php';

mydb_connect();
?>
<!--[if lt IE 7 ]><html lang="en" class="ie6 ielt7 ielt8 ielt9"><![endif]--><!--[if IE 7 ]><html lang="en" class="ie7 ielt8 ielt9"><![endif]--><!--[if IE 8 ]><html lang="en" class="ie8 ielt9"><![endif]--><!--[if IE 9 ]><html lang="en" class="ie9"> <![endif]--><!--[if (gt IE 9)|!(IE)]><!--> 
<html lang="en"><!--<![endif]--> 
	
<!-- Mirrored from wbpreview.com/previews/WB0070A9H/index.htm by HTTrack Website Copier/3.x [XR&CO'2013], Wed, 22 Jan 2014 10:30:52 GMT -->
<head>
		<meta charset="utf-8">
		<title>Dashboard - TechAfghanistan</title>
		<meta name="viewport" content="width=device-width, initial-scale=1.0">
		<link href="css/bootstrap.min.css" rel="stylesheet">
		<link href="css/bootstrap-responsive.min.css" rel="stylesheet">
		<link href="css/site.css" rel="stylesheet">
		<link href="//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css" rel="stylesheet">

		<!--[if lt IE 9]><script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
	</head>
	<body>
		<div class="container">
			<div class="navbar">
				<div class="navbar-inner">
				<div class="container">
						<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse"> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </a> <a class="brand" href="#">TechAfghanistan</a>
						<div class="nav-collapse">
							<ul class="nav">
									
							</ul>
							<form class="navbar-search pull-right" action="#">
								<input type="text" class="search-query span2" placeholder="Search" />
							</form>
							<ul class="nav pull-right">
								<li>
									<a href="profile.html"><i class="fa fa-user"> username</i></a>
								</li>
								
							</ul>
						</div>
					</div>
				</div>
			</div>
			<div class="row">
				<div class="span3">
					<div class="well" style="padding: 8px 0;">
						<ul class="nav nav-list">
							<li class="nav-header">
								TechAfghanistan
							</li>
							<li>
								<a href="index.php"><i class="icon-home"></i> Dashboard</a>
							</li>
							<li>
								<a href="news.php"><i class="icon-home"></i> Posts</a>
							</li>
						</ul>
					</div>
				</div>
			<div class="span9">
					<h2>
						Authors
					</h2>
					<table class="table table-bordered">
						<thead>
							<tr>
								<th>
									id
								</th>
								<th>
									First Name
								</th>
								<th>
									Last Name
								</th>
								<th>
									Email
								</th>
								<th>
									Actions
								</th>
								
								
								</tr>
							
						</thead>
						<tbody>
							<?php
								$authorSelectQry = mysql_query("SELECT * FROM `users` WHERE role = 'author'");
								if(!$authorSelectQry){
									echo mysql_error();
								}
								while($authorSelectRow=mysql_fetch_array($authorSelectQry)){
								?>
								<tr><td><?php echo $authorSelectRow['id']; ?></td><td><?php echo $authorSelectRow['firstname']; ?></td><td><?php echo $authorSelectRow['lastname']; ?></td><td><?php echo $authorSelectRow['email']; ?></td><td><a href="execute/remove_author.php?id=<?php echo $authorSelectRow['id']; ?>"><i class="fa fa-trash-o"></i></a></td></tr>
									<?php
								}
							?>
						</tbody>
						
					</table>
					
					<a class="toggle-link" href="#new-file"><i class="icon-plus"></i> Add New Author</a>
					<form id="new-file" action="execute/add_author.php" method="post" class="form-horizontal hidden">
						<fieldset>
							<legend>New Author</legend>
							<div class="control-group">
								<label class="control-label" for="textarea">First Name</label>
								<div class="controls">
									<input type="text" class="input-xlarge" name="firstname" id="input01" />
								</div>
							</div>
							<div class="control-group">
								<label class="control-label" for="textarea">Last Name</label>
								<div class="controls">
									<input type="text" class="input-xlarge" name="lastname" id="input02" />
								</div>
							</div>
							<div class="control-group">
								<label class="control-label" for="textarea">Email</label>
								<div class="controls">
									<input type="text" class="input-xlarge" name="email" id="input03" />
								</div>
							</div>
							<div class="control-group">
								<label class="control-label" for="textarea">Password</label>
								<div class="controls">
									<input type="password" class="input-xlarge" name="password" id="input03" />
								</div>
							</div>
						
							<div class="form-actions">
								<button type="submit" name="submit" class="btn btn-primary">Add Author</button> <button class="btn">Cancel</button>
							</div>
						</fieldset>
					</form>
				</div>
			</div>
		</div>
		<script src="js/jquery.min.js"></script>
		<script src="js/bootstrap.min.js"></script>
		<script src="js/site.js"></script>
	</body>

<!-- Mirrored from wbpreview.com/previews/WB0070A9H/index.htm by HTTrack Website Copier/3.x [XR&CO'2013], Wed, 22 Jan 2014 10:31:21 GMT -->
</html>